<%--
    Document   : newInserzione
    Created on : 13-mag-2010, 15.44.31
    Author     : MauroTJ
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="Other.Constant"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="Entity.*" %>
<%@ page import="ctrl.Vario" %>

<%
            if (session.isNew() == true || session.getAttribute("user") == null) {
                session.setAttribute("error", "pagina disponibile solo per gli utenti registrati");
                response.sendRedirect("./error.jsp");
            }
%>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="./css/style2.css" media="screen">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Nuova Inserzione</title>
        <%Utente u1 = new Utente();
                    u1 = (Utente) session.getAttribute("user");
                    Integer id = u1.getId();

        %>
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div id="logo">
                    <h1>holydaysrooms</h1>
                </div>
            </div>
            <div id="page">
                <div id="page-bgtop">
                    <div id="page-bgbtm">
                        <div id="content">

                            <form name="newInserzione" action="./Servlet">
                                <table border="0">                           
                                    <tr>
                                        <td>
                                            <h4>Località:</h4>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Regione</td>
                                        <td><input type="text" name="regione" value="" />
                                        </td>
                                        <td></td>
                                        <td></td>
                                    </tr>

                                    <tr>
                                        <td>Provincia:</td>
                                        <td>
                                            <input type="text" name="provincia" value="" />
                                        </td>
                                        <td></td>
                                        <td></td>
                                    </tr>

                                    <tr>
                                        <td>Città:</td>
                                        <td><input type="text" name="localita" value="" /></td>
                                        <td>Indirizzo:</td>
                                        <td><input type="text" name="indirizzo" value="" /></td>
                                    </tr>

                                    <tr>
                                        <td>Tipo di Abitazione:</td>
                                        <td><select name="tipoAbitazione">
                                                <option value="appartamento">Appartamento
                                                <option value="villa">Villa
                                                <option value="cascina">Cascina
                                                <option value="cottage">Cottage
                                                <option value="residence">Residence/Multiproprietà
                                            </select></td>
                                        <td>Zona:</td>
                                        <td><select name="zona">
                                                <option value="campagna">Campagna</option>
                                                <option value="citta">Città</option>
                                                <option value="mare">Mare</option>
                                                <option value="montagna">Montagna</option>
                                            </select></td>
                                    </tr>
                                    <tr>
                                        <td>Breve descrizione:</td>
                                        <td><textarea name="descrizione" rows="5" cols="20"></textarea></td>
                                    </tr>

                                    <tr>
                                        <td><h4>Inizio Disponibilità :</h4></td>
                                        <td></td>
                                    </tr>
                                    <tr><td> Giorno:<select name="giornoi">
                                                <%= Vario.giorni(1)%>
                                            </select></td>
                                        <td>Mese:<select name="mesei">
                                                <%= Vario.mesi(0)%>
                                            </select></td>
                                    </tr>
                                    <tr>
                                        <td>Anno:<select name="annoi">
                                                <%= Vario.anni2(2011)%>
                                            </select></td><td></td>
                                    </tr>
                                    <tr>
                                        <td><h4>Fine Disponibilita :</h4></td>
                                        <td></td>

                                    </tr>
                                    <tr>
                                        <td> Giorno:<select name="giornof">
                                                <%= Vario.giorni(1)%>
                                            </select></td>
                                        <td>Mese:<select name="mesef">
                                                <%= Vario.mesi(0)%>
                                            </select></td>

                                    </tr>
                                    <tr>
                                        <td>Anno: <select name="annof">
                                                <%= Vario.anni2(2011)%>
                                            </select>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td><h4>Descrizione stanze:</h4></td>
                                    </tr>

                                    <tr>
                                        <td>Stanze Totali:</td>
                                        <td><select name="stanzeTotali"><%= Vario.num(0)%></select></td>
                                        <td>Stanze in Affitto:</td>
                                        <td><select name="stanzeInAffitto"><%= Vario.num(0)%></select></td>
                                    </tr>

                                    <tr>
                                        <td>Stanze Singole:</td>
                                        <td><select name="postiSingoli"><%= Vario.num(0)%></select></td>

                                        <td>Stanze Matrimoniali:</td>
                                        <td><select name="postiDoppi"><%= Vario.num(0)%></select></td>
                                    </tr>
                                    <tr>
                                        <td>Parcheggio:</td>
                                        <td>Si:<input type="radio" name="parcheggio" value="si" checked="checked" />
                                            No:<input type="radio" name="parcheggio" value="no" />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>Informazioni Aggiuntive:</td>
                                        <td><textarea name="altreInfo" rows="4" cols="20"></textarea></td>

                                    </tr>
                                    <tr>
                                        <td><input type="submit" value="Invia" name="invia" /></td>
                                        <td><input type="reset" value="Cancella" name="cancella" /></td>
                                        <td><input type="hidden" value="<%=id%>" name="idUtente"></td>
                                    </tr>
                                    </tbody>
                                </table>
                                <input type="hidden" name="azione" value="<%=Constant.CREATEINSERZIONE%>">
                            </form>
                            <div style="clear: both;">&nbsp;</div>
                        </div>
                        <%@include file="/WEB-INF/jspf/menu.jspf" %>
                    </div>
                </div>
            </div>
        </div>
        <div id="footer">
            <p>Copyright (c) 2010 www.holydaysrooms.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
        </div>
    </body>

</html>